//
//  HYBuyGameCountTableView.m
//  HaiYue
//
//  Created by skyline on 2018/1/23.
//  Copyright © 2018年 skyline. All rights reserved.
//

#import "HYBuyGameCountTableView.h"
#import "HYBuyGameAccountCell.h"
@interface HYBuyGameCountTableView()<UITableViewDelegate, UITableViewDataSource>
@end
@implementation HYBuyGameCountTableView
- (instancetype)init
{
    self = [super init];
    if (self)
    {
        self.dataSource = self;
        self.delegate = self;
        self.backgroundColor = LINE_COLOR;
        self.separatorStyle = UITableViewCellSeparatorStyleNone;

    }
    return self;
}

#pragma mark - UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *identifier = @"HYBuyGameAccountCellIdentifier";
    HYBuyGameAccountCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (!cell)
    {
        cell = [[HYBuyGameAccountCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
    }
    cell.dict = nil;
    return cell;
}

#pragma mark - UITableViewDelegate
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return *BuyGameAccountCellHeight;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
    if (self.hydelegate && [self.hydelegate respondsToSelector:@selector(methodForHYBuyGameCountTableViewDelegateWithIndexPath:)])
    {
        [self.hydelegate methodForHYBuyGameCountTableViewDelegateWithIndexPath:indexPath];
    }
}
/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
